package com.yjz.zpay.boradcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.yjz.zpay.utils.PayHelperUtils;

public class AlarmReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {

        try {
//            long currentTimeMillis = System.currentTimeMillis() / 1000;
//            long currentTimeMillis2 = Long.parseLong(SpUtils.getString(context, "time"));
//            long currentTimeMillis3 = currentTimeMillis - currentTimeMillis2;

//            if (currentTimeMillis3 > 60 && currentTimeMillis2 != 0) {
//                PayHelperUtils.sendmsg(context, "轮询任务出现异常,重启中...");
//                PayHelperUtils.startAlipayMonitor(context);
//                PayHelperUtils.sendmsg(context, "轮询任务重启成功");
//            }
        } catch (Exception e) {
            PayHelperUtils.sendmsg(context, "AlarmReceiver异常->>" + e.getMessage());
        }
    }

}
